<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<table border="1">
    <tr>
        <td>名称</td>
        <td>密码</td>
        <td>图片</td>
        <td>分类</td>
        <td>操作</td>
    </tr>
    {% for u in user %}
    <tr>
        <td>{{ u.username }}</td>
        <td>{{ u.password }}</td>
        <td><img src="/static/upload/{{ u.img }}" alt=""></td>
       {% if u.type == 1 %}
        <td>管理员</td>
           {% else %}
           <td>普通用户</td>
       {% endif %}
    </tr>
        <td><button><a href="/delete?id={{ u.id }}">删除</a></button></td>
        <td><button><a href="/up?id={{ u.id }}">修改</a></button></td>
    {% endfor %}

</table>

</body>
</html>
